from django.db import models

# Create your models here.
class Exam(models.Model):
    examid = models.AutoField(primary_key=True)
    examname = models.CharField(max_length=255, blank=True, null=True)
    questionnum = models.IntegerField(blank=True, null=True)
    content = models.CharField(max_length=500, blank=True, null=True)
    ctime = models.BigIntegerField(blank=True, null=True)
    opentime = models.BigIntegerField(blank=True, null=True)

    class Meta:
        app_label = 'exam'
        managed = False
        db_table = 'pf_exam'


class Question(models.Model):
    question = models.CharField(max_length=255, blank=True, null=True)
    type = models.IntegerField(blank=True, null=True)
    answer = models.CharField(max_length=255, blank=True, null=True)
    ctime = models.BigIntegerField(blank=True, null=True)

    class Meta:
        app_label = 'exam'
        managed = False
        db_table = 'pf_question'

class QuestionAnswer(models.Model):
    qid = models.IntegerField(blank=True, null=True)
    userid = models.IntegerField(blank=True, null=True)
    examid = models.IntegerField(blank=True, null=True)
    meetingid = models.IntegerField(blank=True, null=True)
    answer = models.CharField(max_length=255, blank=True, null=True)
    ctime = models.BigIntegerField(blank=True, null=True)

    class Meta:
        app_label = 'exam'
        managed = False
        db_table = 'pf_questionanswer'


